import { secklist} from "../../../request/api"
//封装接口类型
interface StateSeck {
    seckList:Array<object>
 }
const state = {
    seckList:[]

}

const getters = {
    getSeck(state:StateSeck){
        return state.seckList
    }

}

const mutations = {
    REQ_GETSECK(state:StateSeck,payload:any){
      state.seckList = payload
    }


}

const actions = {
    getSeckListActions(context:any){
        secklist()
        .then(res=>{
            // console.log(res);
            if(res.code==200){
                context.commit("REQ_GETSECK",res.list)
            }
        })
    }

}

export default{
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}